Git Tips
- Overwrite local files forcefully 1
git fetch --all
git reset --hard origin/master
git pull origin master
- Migrate repository 2
git clone --mirror <repo>
cd <repo>
git remote set-url --push origin <new repo>
git push --mirror
- Restore local brach 3
git reflog
git checkout -b <branch> <sha>